package com.kusen.village.raise.service.impl;

import com.kusen.village.raise.service.MqttReceiveService;
import com.kusen.village.raise.topic.TopicApplication;
import org.springframework.stereotype.Service;

@Service
public class MqttReceiveServiceImpl implements MqttReceiveService {
    @Override
    public void handlerMqttMessage(String topic, String jsonData) {
        //处理消息数据
        TopicApplication.getTopicApplication().getTopicStaff().handTopic(topic,jsonData);
//        if ("hopeful".equalsIgnoreCase(topic)) {
//            System.out.println("hello,我是hopeful," + jsonData);
//        } else if ("aa".equals(topic)) {
//            System.out.println("aa,我是来自aa," + jsonData);
//        } else if ("bb".equals(topic)) {
//            System.out.println("bb,我是来自bb," + jsonData);
//        } else if ("Kesen-Hopeful-Pub".equals(topic)) {
//            System.out.println(jsonData);
//        }
    }
}
